<include file="Public/min-header" />
<script type="text/javascript">
    window.UEDITOR_Admin_URL = "__ROOT__/Public/plugins/Ueditor/";
    var URL_upload = "{$URL_upload}";
    var URL_fileUp = "{$URL_fileUp}";
    var URL_scrawlUp = "{$URL_scrawlUp}";
    var URL_getRemoteImage = "{$URL_getRemoteImage}";
    var URL_imageManager = "{$URL_imageManager}";
    var URL_imageUp = "{$URL_imageUp}";
    var URL_getMovie = "{$URL_getMovie}";
    var URL_home = "{$URL_home}";
</script>
<load href="__ROOT__/Public/plugins/Ueditor/ueditor.config.js" />
<load href="__ROOT__/Public/plugins/Ueditor/ueditor.all.js" />
<link href="__PUBLIC__/plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
<script src="__PUBLIC__/plugins/daterangepicker/moment.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>
<div class="wrapper">
    <include file="Public/breadcrumb" />
    <section class="content">
        <div class="container-fluid">
            <div class="pull-right">
                <a href="javascript:history.go(-1)" data-toggle="tooltip" title="" class="btn btn-default pull-right" data-original-title="返回"><i class="fa fa-reply"></i></a>
            </div>
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title"><i class="fa fa-list"></i>会计师信息</h3>
                </div>
                <div class="panel-body">
                    <form action="{:U('accountant/handle')}" method="post" >
                        <table class="table table-bordered">
                            <tbody>
                                <tr>
                                    <td class="col-sm-1 text-right">用户名称:</td>
                                    <td>
                                        <input type="text" class="form-control" name="username" value="{$info.username}">
                                    </td>
                                    <td></td>
                                </tr>

                                <tr>
                                    <td class="col-sm-1 text-right">用户登陆密码:</td>
                                    <td>
                                        <input type="text" class="form-control" name="password" value="">
                                    </td>
                                    <td>留空不修改</td>
                                </tr>

                                <tr>
                                    <td class="col-sm-1 text-right">设备号:</td>
                                    <td>
                                        <input type="text" class="form-control" name="registered_id" value="{$info.registered_id}">
                                    </td>
                                    <td></td>
                                </tr>

                                <tr>
                                    <td class="col-sm-1 text-right">专业类型:</td>
                                    <td>
                                        <select name="cat_ids[]" class="form-control" multiple >
                                            <option value="">请选择</option>
                                            <volist name="cat_ids" id="vo">
                                                <option value="{$key}" <in name="key" value="$info.cat_ids">selected</in> >{$vo}</option>
                                            </volist>
                                        </select>
                                    </td>
                                    <td></td>
                                </tr>


                                <tr>
                                    <td class="col-sm-1 text-right">性别:</td>
                                    <td>
                                        <input name="sex" type="radio" value="0" <if condition="$info['sex'] eq 0">checked</if> >保密
                                        <input name="sex" type="radio" value="1" <if condition="$info['sex'] eq 1">checked</if> >男
                                        <input name="sex" type="radio" value="1" <if condition="$info['sex'] eq 2">checked</if> >女
                                    </td>
                                    <td></td>
                                </tr>


                                <tr>
                                    <td class="col-sm-1 text-right">手机号:</td>
                                    <td>
                                        <input type="text" class="form-control" name="mobile" value="{$info.mobile}">
                                    </td>
                                    <td></td>
                                </tr>

                                <tr>
                                    <td class="col-sm-1 text-right">是否验证手机:</td>
                                    <td>
                                        <input name="mobile_validated" type="radio" value="0" <if condition="$info['mobile_validated'] eq 0">checked</if> >否
                                        <input name="mobile_validated" type="radio" value="1" <if condition="$info['mobile_validated'] eq 1">checked</if> >是
                                    </td>
                                    <td></td>
                                </tr>


                                <tr>
                                    <td class="col-sm-1 text-right">悬赏金额:</td>
                                    <td>
                                        <input type="text" class="form-control" name="reward_money" value="{$info.reward_money}">
                                    </td>
                                    <td></td>
                                </tr>
                                <tr>
                                    <td class="col-sm-1 text-right">打赏金额:</td>
                                    <td>
                                        <input type="text" class="form-control" name="bonus_money" value="{$info.bonus_money}">
                                    </td>
                                    <td></td>
                                </tr>
                                <tr>
                                    <td class="col-sm-1 text-right">付费查看金额:</td>
                                    <td>
                                        <input type="text" class="form-control" name="charge_money" value="{$info.charge_money}">
                                    </td>
                                    <td></td>
                                </tr>
                                <tr>
                                    <td class="col-sm-1 text-right">提现金额:</td>
                                    <td>
                                        <input type="text" class="form-control" name="outcash_money" value="{$info.outcash_money}">
                                    </td>
                                    <td></td>
                                </tr>
                                <tr>
                                    <td class="col-sm-1 text-right">总采纳数:</td>
                                    <td>
                                        <input type="text" class="form-control" name="adoption_num" value="{$info.adoption_num}">
                                    </td>
                                    <td></td>
                                </tr>


                                <tr>
                                    <td class="col-sm-1 text-right">单位:</td>
                                    <td>
                                        <input type="text" class="form-control" name="work_unit" value="{$info.work_unit}">
                                    </td>
                                    <td></td>
                                </tr>

                                <tr>
                                    <td class="col-sm-1 text-right">职业证号:</td>
                                    <td>
                                        <input type="text" class="form-control" name="professional_num" value="{$info.professional_num}">
                                    </td>
                                    <td></td>
                                </tr>

                                <tr>
                                    <td class = "text-right">职业证号图像:</td>
                                    <td>
                                        <img src="{$info.professional_pic}" width="100" height="100"/>
                                        <input type="text" id="professional_pic" readonly name="professional_pic" value="{$info.professional_pic}">
                                        <input type="button" class="button" onClick="GetUploadify(1, 'professional_pic', 'head_pic', '')" value="上传职业证号图像" />
                                    </td>
                                    <td></td>
                                </tr>

                                <tr>
                                    <td class = "text-right">头像:</td>
                                    <td>
                                        <img src="{$info.head_pic}" width="100" height="100"/>
                                        <input type="text" id="head_pic" readonly name="head_pic" value="{$info.head_pic}">
                                        <input type="button" class="button" onClick="GetUploadify(1, 'head_pic', 'head_pic', '')" value="上传头像照片" />
                                    </td>
                                    <td></td>
                                </tr>


                                <tr>
                                    <td class = "text-right">所在地址：</td>
                                    <td>
                                        省
                                        <select name="province" id="province" onchange="provinceCG(this.value)">
                                            <volist name="provinceList" id="list">
                                                <option value="{$list.id}" <if condition="$list[id] eq $info[province]">selected="selected"</if>>{$list.name}</option>
                                            </volist>
                                        </select>
                                        市
                                        <select name="city" id="city" >
                                            <volist name="cityList" id="list">
                                                <option value="{$list.id}" <if condition="$list[id] eq $info[city]">selected="selected"</if>>{$list.name}</option>
                                            </volist>
                                        </select>

                                    </td>
                                </tr>



                                <tr>
                                <td class = "text-right">账户状态:</td>
                                <td>
                                    <input name="status" type="radio" value="0" <if condition="$info['status'] eq 0">checked</if> >未审核
                            <input name="status" type="radio" value="1" <if condition="$info['status'] eq 1">checked</if> >审核通过
                                    <input name="status" type="radio" value="2" <if condition="$info['status'] eq 2">checked</if> >审核失败
                            </td>
                            <td>审核通过或失败 将会发送短信通知</td>
                            </tr>

                                <tr>
                                    <td class="col-sm-1 text-right">审核失败原因:</td>
                                    <td>
                                        <input type="text" class="form-control" name="reason" value="">
                                    </td>
                                    <td></td>
                                </tr>


                                <tr>
                                    <td class="col-sm-1 text-right">年费到期时间:</td>
                                    <td>
                                        <input id="expired_time" type="text" class="form-control" name="expired_time" value='{$info.expired_time|date="Y-m-d H:i:s",###}'>

                                    </td>
                                    <td></td>
                                </tr>


                                <notempty name="info[au_id]">
                                    <tr>
                                        <td class="col-sm-1 text-right">注册时间:</td>
                                        <td>
                                            {$info.reg_time|date="Y-m-d H:i:s",###}
                                        </td>
                                        <td></td>
                                    </tr>

                                </notempty>

                                <tr>
                                    <td></td>
                                    <td>
                                        <input type="hidden" value="{$info.au_id}" name="id" />
                                        <input type="hidden" value="{$act}" name="act" />
                                        <button type="submit" class="btn btn-info">
                                            <i class="ace-icon fa fa-check bigger-110"></i> 保存
                                        </button>
                                    </td>
                                </tr>
                            </table>

                    </form>
                </div>
            </div>
        </div>
    </section>
</div>
<script>

    $(document).ready(function () {

        $('#expired_time').daterangepicker({
            format : 'YYYY-MM-DD HH:mm:ss',
            singleDatePicker: true,
            showDropdowns: true,
            timePicker : true,
            timePicker12Hour : false,
            timePickerIncrement : 1, //时间的增量，单位为分钟
            minDate: '2017/08/01',
            maxDate: '2030/01/01',
            locale: {
                applyLabel: '确定',
                cancelLabel: '取消',
                fromLabel: '起始时间',
                toLabel: '结束时间',
                customRangeLabel: '自定义',
                daysOfWeek: ['日', '一', '二', '三', '四', '五', '六'],
                monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
                firstDay: 1
            }
        });
    });


    function provinceCG(id){
        if(id === '')
            return;
        province_id = id;
        $('#city').html('');
        if(id){
            $.ajax({
                type: "GET",
                url: "/index.php?m=Admin&c=user&a=getCityByAjax&province_id=" + id, //+tab,
                success: function (data)
                {
                    if (data)
                    {
                        var data=eval('('+data+')');
                        city = data.list;
                        city_html = '';
                        for(i=0;i<city.length;i++){
                            city_html +=
                                '<option value="'+city[i].id+'" >'+city[i].name+'</option>';
                        }
                        $("#city").html(city_html);
                    }
                }
            });
        }
    }

</script>
</body>

</html>
